/**
 * Copyright (c) 2003-2017 Ben Lau
 * All rights reserved.
 */
package proxy.javaassist;

import java.lang.reflect.Method;

import javassist.util.proxy.MethodHandler;
import proxy.statics.DBQuery;
import proxy.statics.IDBQuery;

/**
 * @author liubin
 *
 */
public class JavassistDynDbQueryHandler implements MethodHandler{
	IDBQuery real = null;
	
	@Override
	public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {

		if (real == null) {
			real=new DBQuery();
		}
		
		return real.request();
		
	}

}
